#!/usr/bin/python
# -*- coding: utf-8 -*-


IND_CONSONANT = 0
IND_LEG_FWD = 1
IND_CIRC_BELOW = 2
IND_YA_YIT = 3
IND_YAY_CHA = 4
IND_KINZI = 5
NUM_INDEXES = 6


grand_index = dict()
for n in range(0x1000, 0x1021+1)):	# Consonants
	grand_index[unichr(n)] = [IND_CONSONANT]

grand_index.update({
   #"Cut off" cases for "na" and "ya"
	u'\u108F':[IND_CONSONANT],
	u'\u1090':[IND_CONSONANT],

	#Leg-fwd, "pure" cases
	u'\u103D':[IND_LEG_FWD],
	u'\u1087':[IND_LEG_FWD],

	#Yay-cha, "pure" cases
	u'\u102B':[IND_YAY_CHA],
	u'\u102C':[IND_YAY_CHA],

	# Ya-yit, "pure" cases
	u'\u103B':[IND_YA_YIT],
	u'\u107E':[IND_YA_YIT],
	u'\u107F':[IND_YA_YIT],
	u'\u1080':[IND_YA_YIT],
	u'\u1081':[IND_YA_YIT],
	u'\u1082':[IND_YA_YIT],
	u'\u1083':[IND_YA_YIT],
	u'\u1084':[IND_YA_YIT],

	
	u'\u103C':[IND_CIRC_BELOW],   #Circle-below, "pure" case
	u'\u108A':[IND_LEG_FWD, IND_CIRC_BELOW],	#Leg-fwd + circle-below


	u'\u1088':[IND_LEG_FWD],
	u'\u1089':[IND_LEG_FWD],   #Leg-fwd, mixed with other letters that we haven't defined yet
	u'\u105A':[IND_YAY_CHA],	#Yay-cha, "pure" mixed with other letters that we haven't defined yet

})

unicode_order = [IND_CONSONANT, IND_YA_YIT, IND_CIRC_BELOW, IND_LEG_FWD, IND_YAY_CHA]

def tag_syllable(syllable):

	#Step 1: "Tag" all letters in the Zawgyi word:
	tagged_components = [u'']*NUM_INDEXES

	for letter in syllable:
		parts = grand_index[letter]
		for part in parts:
			tagged_components[part] = letter

	#Step 2: Output a proper unicode sequence
	output = u''
	for item in unicode_order:
		
	return


import sys

if __name__ == "__main__":
	for argv in sys.argv:
		print tag_syllable(argv),
